/**
 * @date 5:43:45 PM
 * Message.java
 * Administrator
 * TODO
 */
package com.qs.education.controllers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.qs.education.bean.api.PageBean;
import com.qs.education.bean.api.ResponseBean;
import com.qs.education.service.IMessageAPIService;
/**
 * @class Message	
 * @author Warren
 * @description
 * @date Nov 9, 2018 
 */
@RestController
public class MessageController {
	
	@Autowired
	private IMessageAPIService iMessageAPIService;
	
	/**
	 * @author Warren
	 * @param teacherId
	 * @param currentPage
	 * @param pageSize
	 * @return PageBean
	 * @description 根据页码、页数量、id查询教师的消息列表
	 * @date Nov 21, 2018
	 */
	@RequestMapping("/message/getALLMessageByStudentIdAPI")
	public PageBean getALLMessageByStudentId(Long studentId,int currentPage,int pageSize) {
		PageBean pageBean = iMessageAPIService.getALLMessageByStudentId(studentId, currentPage, pageSize);
		return pageBean;
	}
	
	/**
	 * @author Warren
	 * @param teacherId
	 * @param currentPage
	 * @param pageSize
	 * @return PageBean
	 * @description 根据页码、页数量、id查询教师的消息列表
	 * @date Nov 21, 2018
	 */
	@RequestMapping("/message/getALLMessageByTeacherIdAPI")
	public PageBean getALLMessageByTeacherId(String teacherId,int currentPage,int pageSize) {
		PageBean pageBean = iMessageAPIService.getALLMessageByTeacherId(teacherId, currentPage, pageSize);
		return pageBean;
	}
	
	/**
	 * @author Warren
	 * @return ResponseBean
	 * @description 根据id删除消息
	 * @date Nov 20, 2018
	 */
	@RequestMapping("/message/deleteMessageByIdAPI")
	public ResponseBean deleteMessageById(Long id) {
		ResponseBean responseBean = iMessageAPIService.deleteMessageById(id);
		return responseBean;
	}
}
